﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using SkeletonNET.Common.Setup;
using System.Diagnostics;

namespace SkeletonNET.Common.Tests
{
    [TestClass]
    public class TestBootstrapper
    {
        [TestMethod]
        public void TestSetups()
        {
            Bootstrapper.Current
                .SetupIoC()
                .SetupModules();

            Assert.IsTrue(TestSetup1.IsCalled);
            Assert.IsTrue(TestSetup2.IsCalled);
        }
    }

    public class TestSetup1 : ISetup
    {
        public static bool IsCalled { get; set; }
        public void Setup()
        {
            Debug.WriteLine("TestSetup1.Setup");
            IsCalled = true;
        }
    }

    public class TestSetup2 : ISetup
    {
        public static bool IsCalled { get; set; }

        public void Setup()
        {
            Debug.WriteLine("TestSetup2.Setup");
            IsCalled = true;
        }
    }
}
